#ifndef FIREWORK_H
#define FIREWORK_H


#include "usefulMethods.h"


class particle{
	public:
		particle();
		particle(Vector3 velocity, Vector3 startPos);
		void updateEnd(double time);
		Vector3 startPos;
		Vector3 endPos;
		Vector3 velocity;
		float particleColor[3];
};

class firework{
	public:
		firework();

		firework(int numParticles, Vector3 position, Vector3 launchVelocity, float launchHeight);

		//Draws the timer above the ball
		void updateFirework(double elapsedTime);
		
		//Draws the Firework and returns false if it is done drawing
		bool draw();

		static void setupDisplayList();

		Vector3 getPosition();
		static GLuint index;

	protected:
		Vector3 launchVelocity;
		Vector3 launchPosition;
		bool launching;
		int numParticles;
		float launchHeight;
		vector<particle> activeParticles;
		int particleIterations;
		
};


#endif